package com.wnxy.e_rpc;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Client {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendMsg(){
        Object rev =
                rabbitTemplate.convertSendAndReceive("exchange-rpc", "rpc.xx", "我是Jerry");
        System.out.println("返回结果 = " + rev);
    }
}
